package org.aepscolombia.platform.models.entity;
// Generated Apr 8, 2014 9:37:27 AM by Hibernate Tools 3.2.1.GA


import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Fertilizations generated by hbm2java
 */
@Entity
@Table(name="fertilizations")
public class Fertilizations  implements java.io.Serializable {


     private Integer idFer;
     private ProductionEvents productionEvents;
     private CropsTypes cropsTypes;
     private FertilizationsTypes fertilizationsTypes;
     private Date dateFer;
     private Double amountProductUsedFer;
     private String whereBoughtFer;
     private String applicationTechniqueFer;
     private String otherWhereBoughtFer;
     private Boolean status;
     private Integer createdBy;

    public Fertilizations() {
    }
    
    public Fertilizations(Integer idFer) {
        this.idFer = idFer;
    }
	
    public Fertilizations(ProductionEvents productionEvents, FertilizationsTypes fertilizationsTypes, Date dateFer, Double amountProductUsedFer) {
        this.productionEvents = productionEvents;
        this.fertilizationsTypes = fertilizationsTypes;
        this.dateFer = dateFer;
        this.amountProductUsedFer = amountProductUsedFer;
    }
    public Fertilizations(ProductionEvents productionEvents, CropsTypes cropsTypes, FertilizationsTypes fertilizationsTypes, Date dateFer, Double amountProductUsedFer, String whereBoughtFer, String applicationTechniqueFer, String otherWhereBoughtFer, Boolean status, Integer createdBy) {
       this.productionEvents = productionEvents;
       this.cropsTypes = cropsTypes;
       this.fertilizationsTypes = fertilizationsTypes;
       this.dateFer = dateFer;
       this.amountProductUsedFer = amountProductUsedFer;
       this.whereBoughtFer = whereBoughtFer;
       this.applicationTechniqueFer = applicationTechniqueFer;
       this.otherWhereBoughtFer = otherWhereBoughtFer;
       this.status = status;
       this.createdBy = createdBy;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="id_fer", unique=true, nullable=false)
    public Integer getIdFer() {
        return this.idFer;
    }
    
    public void setIdFer(Integer idFer) {
        this.idFer = idFer;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="id_production_event_fer", nullable=false)
    public ProductionEvents getProductionEvents() {
        return this.productionEvents;
    }
    
    public void setProductionEvents(ProductionEvents productionEvents) {
        this.productionEvents = productionEvents;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="fertilized_crop_fer")
    public CropsTypes getCropsTypes() {
        return this.cropsTypes;
    }
    
    public void setCropsTypes(CropsTypes cropsTypes) {
        this.cropsTypes = cropsTypes;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="fertilization_type_fer")
    public FertilizationsTypes getFertilizationsTypes() {
        return this.fertilizationsTypes;
    }
    
    public void setFertilizationsTypes(FertilizationsTypes fertilizationsTypes) {
        this.fertilizationsTypes = fertilizationsTypes;
    }
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="date_fer", nullable=false, length=19)
    public Date getDateFer() {
        return this.dateFer;
    }
    
    public void setDateFer(Date dateFer) {
        this.dateFer = dateFer;
    }
    
    @Column(name="amount_product_used_fer", precision=22, scale=0)
    public Double getAmountProductUsedFer() {
        return this.amountProductUsedFer;
    }
    
    public void setAmountProductUsedFer(Double amountProductUsedFer) {
        this.amountProductUsedFer = amountProductUsedFer;
    }
    
    @Column(name="where_bought_fer", length=17)
    public String getWhereBoughtFer() {
        return this.whereBoughtFer;
    }
    
    public void setWhereBoughtFer(String whereBoughtFer) {
        this.whereBoughtFer = whereBoughtFer;
    }
    
    @Column(name="application_technique_fer", length=20)
    public String getApplicationTechniqueFer() {
        return this.applicationTechniqueFer;
    }
    
    public void setApplicationTechniqueFer(String applicationTechniqueFer) {
        this.applicationTechniqueFer = applicationTechniqueFer;
    }
    
    @Column(name="other_where_bought_fer", length=65535)
    public String getOtherWhereBoughtFer() {
        return this.otherWhereBoughtFer;
    }
    
    public void setOtherWhereBoughtFer(String otherWhereBoughtFer) {
        this.otherWhereBoughtFer = otherWhereBoughtFer;
    }
    
    @Column(name="status")
    public Boolean getStatus() {
        return this.status;
    }
    
    public void setStatus(Boolean status) {
        this.status = status;
    }
    
    @Column(name="created_by")
    public Integer getCreatedBy() {
        return this.createdBy;
    }
    
    public void setCreatedBy(Integer createdBy) {
        this.createdBy = createdBy;
    }
    
}


